<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=path %>/js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="<%=path %>/js/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%=path %>/js/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.3.js"></script>
<link id="easyuiTheme" rel="stylesheet" type="text/css"	href="<%=path %>/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/css/default.css">
<script type="text/javascript" src="<%=path %>/js/easyui/jquery.easyui.min.js"></script>
<script	src="<%=path %>/js/easyui/locale/easyui-lang-zh_CN.js"	type="text/javascript"></script>
<script src="<%=path %>/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<%=path %>/js/ajaxfileupload.js"></script>
<title>网站群编辑</title>
</head>
<body class="easyui-layout" style="visibility:hidden;">
	<div region="north" style="height:31px;overflow:hidden;" split="false" border="false" >
		<div class="datagrid-toolbar">
			<a id="save" icon="icon-save" href="#" class="easyui-linkbutton" plain="true" >保存</a>
		</div>
	</div>
	<script type="text/javascript">
		$(function(){
			$('#save').click(function(){
				//有效性验证
				if(!$('#siteEditForm').form('validate')){
					$.messager.alert('提示','表单还未填写完成!');
					return ;
				}
			
				$.post("${pageContext.request.contextPath }/site/updateSite",$("#siteEditForm").serialize(), function(data){
					if(data.status == 200){
						 //刷新当前页面.
						 $.messager.alert('提示', '公司网站修改成功!', 'info', function() {
								$("#siteEditWindow").window('close');
								$("#siteList").datagrid("reload");
						});
					}
				});
			});
		});
		
	</script>
	
	<div region="center" style="overflow:auto;padding:5px;" border="false">
       <form id="siteEditForm" method="post">
       <input type="hidden" name="id" />
           <table class="table-edit"  width="70%" align="left">
           		<tr class="title"><td colspan="4">网站基本信息</td></tr>
           		<tr>
	           		<td>公司名称:</td><td><input type="text" name="companyname" id="companyname" class="easyui-validatebox" required="true" /></td>
				</tr>
				<tr>
					<td>公司网站:</td><td><input type="text" name="companysite" id="companysite" class="easyui-validatebox" required="true"/></td>
				</tr>
           	</table>
        </form>
     </div>
</body>
</html>